class Animal():
    def jiao(self):
        pass

class Dog():
    def jiao(self):
        print('汪汪汪')

class Cat():
    def jiao(self):
        print('喵喵喵')

# 定义一个统一调用方式
def jiao(obj):
    obj.jiao()

# 传统调用方法
# d1 = Dog()
# d1.jiao()
# c1 = Cat()
# c1.jiao()

# 接口统一调用
jiao(Dog())
jiao(Cat())